home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.mdf / js / functions.js < prev    next >
Encoding:
Text File  |  2004-02-05  |  2.3 KB  |  68 lines

  1.     function WriteTitle()
  2.     {
  3.         document.write ("<title>" + vcWindowTitle + "</title>");
  4.     }
  5.  
  6.     function WriteIssue()
  7.     {
  8.         document.write ("Nr. " + vcIssue);
  9.     }
  10.  
  11.     function WriteMenu (iMenuNo, vcHeader, vcText, vcLink, iSpacing)
  12.     {
  13.         for (var x = 0; x < arrMenu.length; x++)
  14.         {
  15.             document.write ('<div class="menusection">');
  16.             document.write ('<div class="menuheader">' + arrMenu[x].vcTitle + '</div>');
  17.             
  18.             for (y = 0; y < arrMenu[x].arrSubMenu.length; y++)
  19.             {
  20.                 if (arrMenu[x].arrSubMenu[y].arrItem[0] || x > 0 || y == 0)
  21.                 {
  22.                     document.write ('<div class="menuitem"><a href="' + arrMenu[x].arrSubMenu[y].vcLink + '">' + arrMenu[x].arrSubMenu[y].vcTitle + '</a></div>');
  23.                 }
  24.             }
  25.             document.write ('</div>');
  26.         }
  27.     }
  28.  
  29.     function WriteSubMenuItems()
  30.     {
  31.         var oSubMenu = arrMenu[iMenuNo].arrSubMenu[iSubMenuNo];
  32.         var oItem;
  33.         document.write ('<div class="header">' + oSubMenu.vcTitle + '</div>');
  34.         document.write ('<div>NB! Bemµrk, at de st°rste demoer m.v. er nogen tid om at starte - afhµngigt af dit dvd-drevs hastighed.</div>');
  35.         document.write ('<div> </div>');
  36.         document.write ('<div> </div>');
  37.  
  38.         for (var x = 0; x < oSubMenu.arrItem.length; x++)
  39.         {
  40.             oItem = oSubMenu.arrItem[x];
  41.             
  42.             document.write ('<div class="itemouter"><table border="0" cellspacing="0" cellpadding="0" width="98%"><tr><td valign="top">');
  43.             
  44.             document.write ('<div class="itemheader">' + oItem.vcTitle + '</div>');
  45.             document.write ('<div> </div>');
  46.  
  47.             if (oItem.vcRequirements)
  48.             {
  49.                 document.write ('<div><b>Systemkrav:</b> ' + oItem.vcRequirements+ '</div>');
  50.                 document.write ('<div> </div>');
  51.             }
  52.  
  53.             if (oItem.vcDescription)
  54.             {
  55.                 document.write ('<div>' + oItem.vcDescription + '</div>');
  56.                 document.write ('<div> </div>');
  57.                 document.write ('<div> </div>');
  58.             }
  59.  
  60.             document.write ('<div><a href="' + oSubMenu.vcDir + '/' + oItem.vcLink + '">');
  61.             document.write ((oItem.vcInstallText ? oItem.vcInstallText : oSubMenu.vcDefaultInstallText) + '</a></div>');
  62.  
  63.             document.write ('</td><td valign="top" align="right" class="itemimage">');
  64.             if (oItem.vcImage) document.write ('<img border="0" alt="' + oItem.vcTitle + '" src="' + oSubMenu.vcDir + '/' + oItem.vcImage + '">');
  65.  
  66.             document.write ('</td></tr></table></div>');
  67.         }
  68.     }